package cn.shu.Factory;

/**
 * 抽象工厂类
 * Created by 76062 on 2017/9/22.
 */
public class Test {


    public static void main(String[] args) {
        CarFactory factory = new CarFactory();
        Car car1 = (Car) factory.getClz(BMW.class);
        car1.produce();

        Car car2 = (Car) factory.getClz(Benz.class);
        car2.produce();

    }
}
